3.16 \(\int (\frac{x^2}{\text{sech}^{\frac{3}{2}}(x)}-\frac{1}{3} x^2 \sqrt{\text{sech}(x)}) \, dx\)

Optimal. Leaf size=66 \[ -\frac{16}{27} i \sqrt{\cosh (x)} \sqrt{\text{sech}(x)} \text{EllipticF}\left (\frac{i x}{2},2\right )+\frac{2 x^2 \sinh (x)}{3 \sqrt{\text{sech}(x)}}-\frac{8 x}{9 \text{sech}^{\frac{3}{2}}(x)}+\frac{16 \sinh (x)}{27 \sqrt{\text{sech}(x)}} \]

[Out]

(-8*x)/(9*Sech[x]^(3/2)) - ((16*I)/27)*Sqrt[Cosh[x]]*EllipticF[(I/2)*x, 2]*Sqrt[Sech[x]] + (16*Sinh[x])/(27*Sq
rt[Sech[x]]) + (2*x^2*Sinh[x])/(3*Sqrt[Sech[x]])

________________________________________________________________________________________

Rubi [A]  time = 0.157882, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {4188, 4189, 3769, 3771, 2641} \[ \frac{2 x^2 \sinh (x)}{3 \sqrt{\text{sech}(x)}}-\frac{8 x}{9 \text{sech}^{\frac{3}{2}}(x)}+\frac{16 \sinh (x)}{27 \sqrt{\text{sech}(x)}}-\frac{16}{27} i \sqrt{\cosh (x)} \sqrt{\text{sech}(x)} F\left (\left .\frac{i x}{2}\right |2\right ) \]

Antiderivative was successfully verified.

[In]

Int[x^2/Sech[x]^(3/2) - (x^2*Sqrt[Sech[x]])/3,x]

[Out]

(-8*x)/(9*Sech[x]^(3/2)) - ((16*I)/27)*Sqrt[Cosh[x]]*EllipticF[(I/2)*x, 2]*Sqrt[Sech[x]] + (16*Sinh[x])/(27*Sq
rt[Sech[x]]) + (2*x^2*Sinh[x])/(3*Sqrt[Sech[x]])

Rule 4188

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(d*m*(c + d*x)^(m - 1)*(
b*Csc[e + f*x])^n)/(f^2*n^2), x] + (Dist[(n + 1)/(b^2*n), Int[(c + d*x)^m*(b*Csc[e + f*x])^(n + 2), x], x] - D
ist[(d^2*m*(m - 1))/(f^2*n^2), Int[(c + d*x)^(m - 2)*(b*Csc[e + f*x])^n, x], x] + Simp[((c + d*x)^m*Cos[e + f*
x]*(b*Csc[e + f*x])^(n + 1))/(b*f*n), x]) /; FreeQ[{b, c, d, e, f}, x] && LtQ[n, -1] && GtQ[m, 1]

Rule 4189

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Dist[(b*Sin[e + f*x])^n*(b*C
sc[e + f*x])^n, Int[(c + d*x)^m/(b*Sin[e + f*x])^n, x], x] /; FreeQ[{b, c, d, e, f, m, n}, x] &&  !IntegerQ[n]

Rule 3769

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(Cos[c + d*x]*(b*Csc[c + d*x])^(n + 1))/(b*d*n), x
] + Dist[(n + 1)/(b^2*n), Int[(b*Csc[c + d*x])^(n + 2), x], x] /; FreeQ[{b, c, d}, x] && LtQ[n, -1] && Integer
Q[2*n]

Rule 3771

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Dist[(b*Csc[c + d*x])^n*Sin[c + d*x]^n, Int[1/Sin[c + d
*x]^n, x], x] /; FreeQ[{b, c, d}, x] && EqQ[n^2, 1/4]

Rule 2641

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2*EllipticF[(1*(c - Pi/2 + d*x))/2, 2])/d, x] /; FreeQ
[{c, d}, x]

Rubi steps

\begin{align*} \int \left (\frac{x^2}{\text{sech}^{\frac{3}{2}}(x)}-\frac{1}{3} x^2 \sqrt{\text{sech}(x)}\right ) \, dx &=-\left (\frac{1}{3} \int x^2 \sqrt{\text{sech}(x)} \, dx\right )+\int \frac{x^2}{\text{sech}^{\frac{3}{2}}(x)} \, dx\\ &=-\frac{8 x}{9 \text{sech}^{\frac{3}{2}}(x)}+\frac{2 x^2 \sinh (x)}{3 \sqrt{\text{sech}(x)}}+\frac{1}{3} \int x^2 \sqrt{\text{sech}(x)} \, dx+\frac{8}{9} \int \frac{1}{\text{sech}^{\frac{3}{2}}(x)} \, dx-\frac{1}{3} \left (\sqrt{\cosh (x)} \sqrt{\text{sech}(x)}\right ) \int \frac{x^2}{\sqrt{\cosh (x)}} \, dx\\ &=-\frac{8 x}{9 \text{sech}^{\frac{3}{2}}(x)}+\frac{16 \sinh (x)}{27 \sqrt{\text{sech}(x)}}+\frac{2 x^2 \sinh (x)}{3 \sqrt{\text{sech}(x)}}+\frac{8}{27} \int \sqrt{\text{sech}(x)} \, dx\\ &=-\frac{8 x}{9 \text{sech}^{\frac{3}{2}}(x)}+\frac{16 \sinh (x)}{27 \sqrt{\text{sech}(x)}}+\frac{2 x^2 \sinh (x)}{3 \sqrt{\text{sech}(x)}}+\frac{1}{27} \left (8 \sqrt{\cosh (x)} \sqrt{\text{sech}(x)}\right ) \int \frac{1}{\sqrt{\cosh (x)}} \, dx\\ &=-\frac{8 x}{9 \text{sech}^{\frac{3}{2}}(x)}-\frac{16}{27} i \sqrt{\cosh (x)} F\left (\left .\frac{i x}{2}\right |2\right ) \sqrt{\text{sech}(x)}+\frac{16 \sinh (x)}{27 \sqrt{\text{sech}(x)}}+\frac{2 x^2 \sinh (x)}{3 \sqrt{\text{sech}(x)}}\\ \end{align*}

Mathematica [A]  time = 0.0907725, size = 55, normalized size = 0.83 \[ \frac{1}{27} \sqrt{\text{sech}(x)} \left (-16 i \sqrt{\cosh (x)} \text{EllipticF}\left (\frac{i x}{2},2\right )+9 x^2 \sinh (2 x)-12 x+8 \sinh (2 x)-12 x \cosh (2 x)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x^2/Sech[x]^(3/2) - (x^2*Sqrt[Sech[x]])/3,x]

[Out]

(Sqrt[Sech[x]]*(-12*x - 12*x*Cosh[2*x] - (16*I)*Sqrt[Cosh[x]]*EllipticF[(I/2)*x, 2] + 8*Sinh[2*x] + 9*x^2*Sinh
[2*x]))/27

________________________________________________________________________________________

Maple [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{{x}^{2} \left ({\rm sech} \left (x\right ) \right ) ^{-{\frac{3}{2}}}}-{\frac{{x}^{2}}{3}\sqrt{{\rm sech} \left (x\right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/sech(x)^(3/2)-1/3*x^2*sech(x)^(1/2),x)

[Out]

int(x^2/sech(x)^(3/2)-1/3*x^2*sech(x)^(1/2),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int -\frac{1}{3} \, x^{2} \sqrt{\operatorname{sech}\left (x\right )} + \frac{x^{2}}{\operatorname{sech}\left (x\right )^{\frac{3}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/sech(x)^(3/2)-1/3*x^2*sech(x)^(1/2),x, algorithm="maxima")

[Out]

integrate(-1/3*x^2*sqrt(sech(x)) + x^2/sech(x)^(3/2), x)

________________________________________________________________________________________

Fricas [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/sech(x)^(3/2)-1/3*x^2*sech(x)^(1/2),x, algorithm="fricas")

[Out]

Exception raised: UnboundLocalError

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \frac{\int - \frac{3 x^{2}}{\operatorname{sech}^{\frac{3}{2}}{\left (x \right )}}\, dx + \int x^{2} \sqrt{\operatorname{sech}{\left (x \right )}}\, dx}{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2/sech(x)**(3/2)-1/3*x**2*sech(x)**(1/2),x)

[Out]

-(Integral(-3*x**2/sech(x)**(3/2), x) + Integral(x**2*sqrt(sech(x)), x))/3

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int -\frac{1}{3} \, x^{2} \sqrt{\operatorname{sech}\left (x\right )} + \frac{x^{2}}{\operatorname{sech}\left (x\right )^{\frac{3}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/sech(x)^(3/2)-1/3*x^2*sech(x)^(1/2),x, algorithm="giac")

[Out]

integrate(-1/3*x^2*sqrt(sech(x)) + x^2/sech(x)^(3/2), x)